<?php
namespace Home\Controller;
use Think\Controller;
class ApiController extends Controller {
    public function index(){
        
    }

    public function insert_data(){
        $data = array(
        	'goods_name' => '"'.rand(100000,999999).'"',
        	'goods_sn' => '"'.rand(100000,999999).'"',
        	'goods_number' => '"'.rand(100000,999999).'"',
        	'market_price' => '"'.rand(100000,999999).'"',
        	'shop_price' => '"'.rand(100000,999999).'"',
        	'supplier_id' => '"'.rand(100000,999999).'"',
        	'term_id' => '"'.rand(100000,999999).'"',
        	'goods_desc' => '"'.rand(100000,999999).'"',
        );

        for ($i=0; $i < 413; $i++) { 
        	M('goods') -> data($data) -> add();
        }
    }
    
}